<template>
  <div>
    <h3>关于我们</h3>
    <button @click="goHome">点击到home</button>
  </div>
</template>

<script>
export default {
  methods: {
    goHome() {
      setTimeout(() => {
        // 通过this.$router对象中的push/replace方法完成路由切换
        // push/replace  string|object
        // this.$router.push('/home')
        this.$router.push({
          path: '/home',
          query: { id: 200 }
        })
      }, 3000)
    }
  }
}
</script>

<style lang="scss" scoped></style>
